<script type="text/javascript" src="${base}/scripts/kcgl/cksh_detail.js"></script>
<div id="cksh_tabs" class="easyui-tabs" detail="true" data-options="fit:true,border:false">
<input type="hidden" id="xsd_id" value="${(xsd.id)!}"/>
<input type="hidden" id="xsd_xsdh" value="${(xsd.xsdh)!}"/>
<input type="hidden" id="xsd_ewmtime" value="${(ewmtime)!}"/>
<#--<input type="hidden" id="xsd_detail_xslx" name="xsd.xslx" value="<#if xsd??>${(xsd.xslx)!}<#else>${xslx}</#if>"/>-->
<input type="hidden" id="xsd_detail_xslx" value="${(xsd.xslx)!}"/>
<div title="销售信息">
        <table style="width: 100%" class="tb tab-t t-bor">
            <input type="hidden" id="cksh_id" value="${(xsd.id)!}"/>
            <col width="70px"/>
            <col width=""/>
            <col width="70px"/>
            <col width=""/>
            <col width="70px"/>
            <col width=""/>
            <tr>
                <th style="color:#f45212;">
                    编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：
                </th>
                <td>
                ${(xsd.xsdh)!}
                </td>
                <th>路&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;径：</th>
                <td colspan="3">
                <#if xsd?? && xsd.lj??>
                ${(xsd.lj.mc)!}
                </#if>
                </td>
            </tr>
            <tr>
                <th>销售合同：</th>
                <td>
                    <a href="javascript:void(0)" onclick="viewCkshXshtDetail('${(xsd.xsht.id)!}')">
                    ${(xsd.xsht.htbm)!}
                    </a>
                </td>
                <th>销售类型：</th>
                <td>
                <#if xsd.xslx?? && xsd.xslx=="htxs" >合同销售<#else>
                    <#if xsd.xslx?? && xsd.xslx=="kcls" >库存零售<#else>保供销售
                    </#if></#if>
                </td>

                <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：</th>
                <td>
                ${(xsd.kh.qc)!}
                </td>
            </tr>
            <tr>
                <th>工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;程：</th>
                <td>
                ${(xsd.gc.mc)!}
                </td>
                <th>提货仓库：</th>
                <td>
                <#if xsd.thck??>${(xsd.thck.mc)!}</#if>
                </td>
                <th>开单日期：</th>
                <td>
                ${(xsd.sxsj?date)!}
                </td>
            </tr>
            <tr>
                <th>计划发货：</th>
                <td>
                ${(xsd.fhsj?date)!}
                </td>
                <th>税&nbsp;率(%)：</th>
                <td colspan="3">
                <#if xsd.sl??>${(xsd.sl?string("0.0000"))!}</#if>
                </td>
            </tr>
            <tr>
                <th>发运责任：</th>
                <td>
                ${(xsd.fyzr.z)!}
                </td>
                <th>代收费用：</th>
                <td>
                ${(xsd.dsyfje)!}
                </td>
                <th>提&nbsp;货&nbsp;&nbsp;人：</th>
                <td>
                ${(xsd.thr)!}
                </td>
            </tr>
            <tr>
                <th>交货时间：</th>
                <td>
                ${(xsd.jhsj?date)!}
                </td>
                <th>送货地址：</th>
                <td colspan="3">
                ${(xsd.jhdz)!}
                </td>

            </tr>
            <tr>
                <th>收&nbsp;货&nbsp;&nbsp;人：</th>
                <td>
                ${(xsd.shr.xm)!}
                </td>
                <th>联系电话：</th>
                <td>
                ${(xsd.shrdh)!}
                </td>
                <th>交货要求：</th>
                <td>
                ${(xsd.jhyq)!}
                </td>
            </tr>
        <#if xsd?? && xsd.xslx?? && xsd.xslx=="kcls" >
            <tr>
                <th>已&nbsp;审&nbsp;核：</th>
                <td>
                    <#if xsd.cwsh??&&xsd.cwsh>是<#else>否</#if>
                </td>
                <th>审核时间：</th>
                <td>
                ${(xsd.shsj?date)!}
                </td>
                <th>审&nbsp;核&nbsp;&nbsp;人：</th>
                <td>
                ${(xsd.shr.xm)!}
                </td>
            </tr>
        </#if>
            <tr>
                <th>已&nbsp;出&nbsp;&nbsp;库：</th>
                <td>
                <#if xsd.yck>是<#else>否</#if>
                </td>
             <#if xsd.yck==true>
                <th>出库时间：</th>
                <td>
                ${(xsd.cksj?date)!}
                </td>
                <th>出&nbsp;库&nbsp;&nbsp;人：</th>
                <td>
               ${(xsd.ckr.xm)!}
                </td> <#else>
                </#if>
            </tr>
            <tr>
                <th>申报公司：</th>
                <td>
                ${(xsd.sbgs.qc)!}
                </td>
                <th>申报部门：</th>
                <td>
                ${(xsd.sbbm.qc)!}
                </td>
                <th>申&nbsp;报&nbsp;&nbsp;人：</th>
                <td>
                ${(xsd.sbr.xm)!}
                </td>
            </tr>
            <tr>
                <th>销售公司：</th>
                <td>
                ${(xsd.xsgs.qc)!}
                </td>
                <th>协办公司：</th>
                <td>
                ${(xsd.xbgs.qc)!}
                </td>
                <th>协办部门：</th>
                <td>
                ${(xsd.xbbm.qc)!}
                </td>
            </tr>
            <tr>
                <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
                <td colspan="5">
                ${(xsd.bz)!}
                </td>
            </tr>
            <tr>
                <th>制&nbsp;单&nbsp;&nbsp;人：</th>
                <td>${(xsd.createUser.xm)!}</td>
                <th>制单时间：</th>
                <td>${(xsd.dateCreated?datetime)!}</td>
            </tr>
        </table>
    </div>
    <div title="销售明细">
        <table id="cksh_xsdmx_table" class="easyui-datagrid" url="${base}/kcgl/cksh/cksh_xsmx?xsdId=${(xsd.id)!}"
               rownumbers="true" style="width: 1700px" fitColumns="true">
            <thead>
            <tr>
                <th data-options="field:'wzgg.code',width:85,align: 'center'" rowspan="2">物资编码</th>
                <th data-options="field:'wzgg.name',width:60,align: 'center'" rowspan="2">物资名称</th>
                <th data-options="field:'wzgg.ggxh',width:60,align: 'center'" rowspan="2">规格型号</th>
                <th data-options="field:'wzgg.dw',width:55,align: 'center'" rowspan="2">单位</th>
                <th data-options="field:'cd.z',width:55,align: 'center'" rowspan="2">产地</th>
                <th data-options="field:'jzfs.z',width:55,align: 'center'" rowspan="2">记重方式</th>
                <th data-options="field:'kh.khbm',width:85,align: 'center'" rowspan="2">卡号</th>
                <th colspan="2">开单</th>
                <th colspan="2">出库</th>
                <th data-options="field:'bhsj',width:85,formatter:formatJeForHtml,align: 'right'" rowspan="2">不含税单价(元)</th>
                <th data-options="field:'bhse',width:85,formatter:formatJeForHtml,align: 'right'" rowspan="2">不含税总金额(元)</th>
                <th data-options="field:'hsj',width:85,formatter:formatJeForHtml,align: 'right'" rowspan="2">含税单价(元)</th>
            </tr>
            <tr>
                <th data-options="field:'js',width:80,align: 'right'" rowspan="2">件数</th>
                <th data-options="field:'sbsl',width:100,formatter:formatSlForHtml,align: 'right'" rowspan="2">重量</th>
                <th data-options="field:'ck_js',width:80,align: 'right'" rowspan="2">件数</th>
                <th data-options="field:'ck_sbsl',width:100,formatter:formatSlForHtml,align: 'right'" rowspan="2">重量</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="销售单打印">
        <div id="xsdy-toolbar">
            <div class="PTools">
                <ul class="niu">
                    <li><span class="xuan">选择打印机：</span>
                        <select class="ze" name="" style="">
                            <option>——默认——</option>
                        </select>
                    </li>
                    <li><a class="she" href="javascript:void(0);" onclick="checkIsInstall('XSD')">检查插件</a></li>
                    <li><a class="watch" href="javascript:void(0);" onclick="xsdyPrintPreview()">打印</a></li>
                <#--<li><a class="pen" href="javascript:void(0);" onclick="xsdyPrint()">打印</a></li>-->
                 <#--   <li><a class="pen" href="javascript:void(0);" onclick="CreatePrintPage1();">套打</a></li>-->
                </ul>
                <ul class="niu">
                    <li><a href="javascript:void(0);" class="rep" plain="true" id="xsd_csl"
                    <#--onclick="cslClick1('cksl_name');"-->>出售联</a></li>
                <#--   <li><a href="javascript:void(0);" class="rep" plain="true"
                onclick="jzlClick('cksl_name');">记账联</a></li>-->
                    <li><a href="javascript:void(0);" class="rep" plain="true"  id="xsd_thd"
                    <#--onclick="thdClick1('cksl_name');"-->>提货单</a></li>
                    <li><a href="javascript:void(0);" class="rep" plain="true"  id="xsd_shd"
                    <#-- onclick="shdClick1('cksl_name');"-->>送货单</a>
                </ul>

            </div>
            <table>
                <input type="hidden" id="xsd_yfsl_1" value="on"/>   <#--应发数量-->
                <input type="hidden" id="xsd_sfsl_1" value="on"/>   <#--实发数量-->
                <input type="hidden" id="xsd_kcdj_1" value="on"/>   <#--库存单价-->
                <input type="hidden" id="xsd_kcje_1" value="on"/>  <#-- 库存金额-->
                <input type="hidden" id="xsd_bhs_1" value="on"/>    <#--出售单价(不含税)-->
                <input type="hidden" id="xsd_hs_1" value="on"/>     <#--出售单价(含税)-->
                <input type="hidden" id="xsd_wse_1" value="on"/>   <#-- 无税额-->
                <input type="hidden" id="xsd_hse_1" value="on"/>    <#--含税额-->
                <input type="hidden" id="xsd_se_1" value="on"/>      <#--税额-->
                <tr> <th>选择打印:</th>
                    <td>
                        应发数量：<input type="checkbox" id="xsd_yfsl" checked="true"/>&nbsp;&nbsp;&nbsp;
                        实发数量：<input type="checkbox" id="xsd_sfsl" checked="true"/>&nbsp;&nbsp;&nbsp;
                        库存单价：<input type="checkbox" id="xsd_kcdj" checked="true"/>&nbsp;&nbsp;&nbsp;
                        库存总金额：<input type="checkbox" id="xsd_kcje" checked="true"/>&nbsp;&nbsp;&nbsp;
                        出售单价(不含税)：<input type="checkbox" id="xsd_bhs" checked="true"/>&nbsp;&nbsp;&nbsp;
                        出售单价(含税)：<input type="checkbox" id="xsd_hs" checked="true"/>&nbsp;&nbsp;&nbsp;
                        无税总金额：<input type="checkbox" id="xsd_wse" checked="true"/>&nbsp;&nbsp;&nbsp;
                        含税总金额：<input type="checkbox" id="xsd_hse" checked="true"/>&nbsp;&nbsp;&nbsp;
                        税额：<input type="checkbox" id="xsd_se" checked="true"/>
                    </td>
                </tr>
            </table>
            <div id="xsdy_id">
                <object id="XSD_LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
                    <embed id="XSD_LODOP_EM" type="application/x-print-lodop" width=0 height=0
                           pluginspage="install_lodop32.exe"></embed>
                </object>
                <div id="xsdy_print_id" class="textcon">
                    <table id="xsdy_print_table" class="tb" style="width: 100%;font-size:13px;">
                        <input id="xsd_thck_detail" type="hidden" value="${(xsd.thck.mc)!}">
                        <input id="xsd_thzckdz_detail" type="hidden" value="${(xsd.thck.dz)!}">
                        <input id="xsd_bz" type="hidden" value="${(xsd.bz)!}">
                        <input id="ysgjList" type="hidden" value="${(xsd.psd.shch)!}"/>
                        <tbody>
                        <colgroup>
                            <col width="10%;"/>
                            <col width="27%"/>
                            <col width="15%;"/>
                            <col width="20%"/>
                            <col width="12%;"/>
                            <col width="23%"/>
                        </colgroup>
                        <tbody>
                        <tr>
                            <th>供应单位:</th>
                            <td><input id="xsddetail_xsgs" class="input-tian" readonly="readonly"
                                       value="${(xsd.sbgs.qc)!}"/></td>
                            <td rowspan="3" colspan="2" style="text-align: center;font-size: 18px">
                                <span id="xsddy_csl" style="font-size: 20px;">${(xsd.xsgs.qc)!}物资出库单(销售)</span>
                                <span id="xsddy_thd" style="font-size: 20px;display: none">${(xsd.xsgs.qc)!}物资出库单(销售)</span>
                                <span id="xsddy_shd" style="font-size: 20px;display: none">${(xsd.xsgs.qc)!}物资出库单(送货)</span>
                            </td>
                            <th>售料单编号:</th>
                            <td><input id="xsddetail_xsdh" class="input-tian" readonly="readonly"
                                       value="${(xsd.xsdh)!}"/></td>
                        </tr>
                        <tr>
                            <th>购料单位:</th>
                            <td><input id="xsddetail_kh" class="input-tian" readonly="readonly" value="${(xsd.kh.qc)!}"/>
                            </td>
                            <th>制单日期:</th>
                            <td><input id="xsddetail_sxsj" class="input-tian" readonly="readonly"
                                       value="<#if xsd??>${(xsd.dateCreated?date)!}</#if>"/></td>
                        </tr>
                        <tr>
                            <th>提货仓库:</th>
                            <td><input id="xsddetail_thck" class="input-tian" readonly="readonly"
                                       value="${(xsd.thck.mc)!}"/></td>
                            <th>发货日期:</th>
                            <td><input id="xsddetail_jhrq" class="input-tian" readonly="readonly"
                                       value="<#if xsd??>${(xsd.fhsj?date)!}</#if>"/></td>
                        </tr>
                        <#-- <tr><th>出库状态:</th>
                        <td>
                        <#if xsd.yck><input class="input-tian" readonly="readonly"
                                            value="已出库"/><#else>
                            <input class="input-tian" readonly="readonly" value="未出库"/></#if>
                        </td></tr>-->
                        </tbody>
                    </table>
                </div>

                <div id="xsdy_xsd_id" class="textcon"></div>


                <div id="xsdy_detail_id" class="textcon">
                    <table class="tb" style="width: 100%;font-size:13px;">
                        <colgroup>
                            <col width="10%;"/>
                            <col width="15%"/>
                            <col width="10%;"/>
                            <col width="15%"/>
                            <col width="10%;"/>
                            <col width="15%"/>
                        </colgroup>
                        <tbody>
                        <tr>
                            <th style="font-size: 12px;">备注:</th>
                            <td>
                                <input id="xsddy_bz" class="input-tian" readonly="readonly"
                                       value="${(xsd.bz)!} ${(xsd.gc.mc)!}"/>
                            </td>
                            <th>出库状态:</th>
                            <td>
                            <#if xsd.yck><input class="input-tian" readonly="readonly"
                                                value="已出库"/><#else>
                                <input class="input-tian" readonly="readonly" value="未出库"/></#if>
                            </td>
                        </tr>
                        <tr>
                            <th style="font-size: 12px;">提货人:</th>
                            <td>
                                <input id="xsddy_thr" class="input-tian" readonly="readonly" value="${(xsd.thr)!}"/>
                            </td>
                            <th style="font-size: 12px;">发料员:</th>
                            <td>
                                <input id="xsddy_fly" class="input-tian" readonly="readonly" value="${(xsd.ckr.xm)!}"/>
                            </td>
                            <th style="font-size: 12px;">制单人:</th>
                            <td>
                                <input id="xsddy_zdr" class="input-tian" readonly="readonly"
                                       value="${(xsd.createUser.xm)!}"/>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td colspan="1"></td>
                            <th></th>
                            <td>${(currentTime?string('yyyy-MM-dd HH:mm:ss'))!}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div